/*
Copyright (c) 2008,2009, David Beck

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef _rt0d4_rx_internal_h_included_
#define _rt0d4_rx_internal_h_included_

#include "rt0d4_rx.h"

/**
    @file rt0d4_rx_internal.h
    @brief These functions used as the Rx callbacks that implements the security model

    @file rt0d4_rx_err.h
    @brief Error values for rt0d4::rx

    @file rt0d4_rx_err.c
    @brief Error values for rt0d4::rx (Implementation)
*/

RT0D4_CDECL
int rt0d4_rx_Close( struct rx_securityClass *aobj );

RT0D4_CDECL
int rt0d4_rx_NewConnection(
                struct rx_securityClass *aobj,
                struct rx_connection *aconn );

RT0D4_CDECL
int rt0d4_rx_DestroyConnection(
                struct rx_securityClass *aobj,
                struct rx_connection *aconn );

RT0D4_CDECL
int rt0d4_rx_CreateChallenge(
                struct rx_securityClass * aobj,
                struct rx_connection * aconn);

RT0D4_CDECL
int rt0d4_rx_GetChallenge(
                struct rx_securityClass * aobj,
                struct rx_connection * aconn,
                struct rx_packet * apacket);

RT0D4_CDECL
int rt0d4_rx_CheckResponse(
                struct rx_securityClass * aobj,
                struct rx_connection * aconn,
                struct rx_packet * apacket);

RT0D4_CDECL
int rt0d4_rx_CheckAuthentication(
                struct rx_securityClass * aobj,
                struct rx_connection * aconn);

RT0D4_CDECL
int rt0d4_rx_PreparePacket (
                struct rx_securityClass * aobj,
                struct rx_call * acall,
                struct rx_packet * apacket );

RT0D4_CDECL
int rt0d4_rx_SendPacket(
                struct rx_securityClass * aobj,
                struct rx_call * acall,
                struct rx_packet * apacket);

RT0D4_CDECL
int rt0d4_rx_CheckPacket (
                struct rx_securityClass * aobj,
                struct rx_call * acall,
                struct rx_packet * apacket );

RT0D4_CDECL
int rt0d4_rx_GetResponse(
                struct rx_securityClass * aobj,
                struct rx_connection * aconn,
                struct rx_packet * apacket);

#endif /* _rt0d4_rx_internal_h_included_ */
